
'use strict';
const fs = require("fs");
var en = require("./encrypt");
var args = process.argv.splice(2);
var cryptLength = 0;

console.log(args);

require.extensions[".jse"] = function(module, filename) {
   var data = fs.readFileSync(filename, 'utf8');
   console.log(data);
   data =  en.decrypt(data, args[2], args[3]);
   module._compile(data, filename);
   //cryptLength ++;
   //if (cryptLength == args[1]) {
     //process.argv = [];
     //args = [];
	 //console.log("decript success");
   //}
}
